package com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow.cmdb;

import com.glsc.ngateway.common.base.domain.mysql.gateway.FlowFormBaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * @author zhengyr
 * @date 2023/8/2-14:44
 * 新增的配件规格明细数据
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@Entity
@Where(clause = "deleted = 0")
@SQLDelete(sql = "update t_gw_flow_form_part_standard_new_detail set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@SQLDeleteAll(sql = "update t_gw_flow_form_part_standard_new_detail set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@Table(name = "t_gw_flow_form_part_standard_new_detail")
@org.hibernate.annotations.Table(appliesTo = "t_gw_flow_form_part_standard_new_detail", comment = "新增的配件规格明细数据-配件规格变更流程子表")
public class FlowFormNewPartStandardDetail extends FlowFormBaseEntity {

    @Column(name = "modify_type", columnDefinition = "varchar(10) comment '业务类型:0-新增,1-删除'")
    private String modifyType;

    @Column(name = "part_standard_code", length = 100)
    private String partStandardCode;

    @Column(name = "name", length = 100)
    private String name;

    @Column(name = "brand", length = 100)
    private String brand;

    @Column(name = "part_num", length = 100)
    private String partNum;

    @Column(name = "standard_num", length = 100)
    private String standardNum;

    @Column(name = "adapt_model", length = 100)
    private String adaptModel;

    @Column(name = "performance", length = 100)
    private String performance;

    @Column(name = "channel_amount", length = 10)
    private String channelAmount;

    @Column(name = "port_type", length = 100)
    private String portType;

    @Column(name = "part_type_id")
    private Integer partTypeId;

    @Column(name = "reserve1", length = 100)
    private String reserve1;

    @Column(name = "reserve2", length = 100)
    private String reserve2;
}
